Helpful Information
 
 
Category: OOP CMS
OOP CMS-> Controlling functions etc

Hi Guys, sorry I didnt phrase the heading too well. Anyway, the problem I have is this:

Over the past 2 years I have created and programmed 5 different CMSes. In most cases I haven't used OOP as at the job I worked at they had no professionals to learn from except some shoddy examples.

Recently (the past 3 weeks) I have been working on a new, awesome (*cough) CMS. And it is going really well. The only problem is just a problem of ease of use and which would be the best method:

Method 1
I have only two PHP documents (on the frontend). The first document is the index.php which contains the framework and css. Every time the user clicks a link it calls a function from the ContentBuilder class which selects which type of page to display. (gallery, event listing etc).

Method 2
Have an index page, then have a seperate page for each type of listing eg page.php (loads static content), gallery.php (loads images etc). Then when the user clicks a link it calls a function which selects which page to include in the index page.

Any advice would be welcome, I think I am doing a pretty decent job (*cough). But there is always a better and more efficient way.

The first route is the one I'd take. Though both would work the problem with the second is reliance on files existing, while the first option would let you capture these problems and inform users of trouble. Another consideration is the type of system you are planning on using - a push based versus pull based system.

I still follow a standard 1 file per 1 object class methodology (except where an object is fully and only supported by the current object, since PHP doesn't support nested classes). Merge the two ideas together and you'll end up with a Gallary object thats called from a ContentBuilder object factory for display, which is what I'd suggest.

This is of course just an idea, I have yet to complete my full CMS (OO as well). I've got one heck of a design for it, but I've run into a few implementation problems, which kinda well... sucks.

cool dude. thanks. I'll post my completed item sometime for scrutiny.

I'd like to have a look at yours if possible? Or at least just a little section to see how I could improve mine, you seem like a very seasoned PHP guru.

PLH.

Hi idalatob,
You may find http://www.codingforums.com/showthread.php?t=129123 interesting.

hi abduraooft. thanks for the link.

cool dude. thanks. I'll post my completed item sometime for scrutiny.

I'd like to have a look at yours if possible? Or at least just a little section to see how I could improve mine, you seem like a very seasoned PHP guru.

PLH.

I'd love to share, but I'm currently still in design phase (and some code trials to see what I can get away with). I'm hoping to get to implementation phase this weekend or the weekend after.










privacy (GDPR)